package com.circle.interests.biz.request;

import com.circle.common.core.validator.AddGroup;
import com.circle.common.core.validator.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;

/**
 * @author zhou
 * @date 2021/3/27
 */
@Data
@ApiModel(value = "奖品分类")
public class PrizeCategoryRequest implements Serializable {

    @Null(groups = {AddGroup.class})
    @NotNull(groups = {UpdateGroup.class})
    @Range(min = 1, groups = {AddGroup.class, UpdateGroup.class})
    @ApiModelProperty(value = "id，修改时必填")
    private Long id;

    @NotBlank
    @Length(min = 1, max = 64, groups = {AddGroup.class, UpdateGroup.class})
    @ApiModelProperty(value = "名称")
    private String name;

    @Length(max = 255, groups = {AddGroup.class, UpdateGroup.class})
    @ApiModelProperty(value = "说明")
    private String remark;
}
